<template>
  <div class="detail" v-if="userInfo" >
    <!-- 头部带返回按钮 -->
    <div align="left">
      <span>患者编号:</span>{{ userInfo.patientId}}
    </div>
    <div align="left">
      <span>性别:</span>{{ userInfo.gender}}
    </div>
    <div align="left">
      <span>年龄:</span>{{ userInfo.age}}
    </div>
    <div align="left">
      <span>出院方式:</span>{{ userInfo.cyfs}}
    </div>
    <div align="left">
      <span>入院科室:</span>{{ userInfo.ryks}}
    </div>
    <div align="left">
      <span>呼吸机使用时间:</span>{{ userInfo.hxjsysj}}
    </div>
    <div align="left">
      <span>全部信息:</span>{{ userInfo.info}}
    </div>
  </div>
</template>

<script>
import {Button, Spin, Descriptions, Tag, Empty, Icon, Layout, Menu, Dropdown, Avatar} from 'ant-design-vue';
import {jzsj, zyzd, zzqs, zzqsList} from "../api/jzsj";

export default {
  name: 'ZZQS',
  components: {
    'a-layout': Layout,
    'a-layout-sider': Layout.Sider,
    'a-layout-header': Layout.Header,
    'a-layout-content': Layout.Content,
    'a-layout-footer': Layout.Footer,
    'a-menu': Menu,
    'a-menu-item': Menu.Item,
    'a-sub-menu': Menu.SubMenu,
    'a-menu-divider': Menu.Divider,
    'a-button': Button,
    'a-icon': Icon,
    'a-dropdown': Dropdown,
    'a-avatar': Avatar
  },
  data() {
    return {
      userInfo: null
    }
  },

  mounted() {
    const userId = this.$route.query.id;
    console.info("获取参数:"+userId);
    this.zzqsFun(userId);
  },
  methods: {
    async zzqsFun(patientId) {
      console.info(this.patientId)
      // 显示加载状态
      this.loading = true;
      let params = {
        patientId: patientId
      };
      let res = await zzqs(params);
      if (res.status === 0) {
        this.userInfo = res.data;
      }
      this.loading = false;
    },
  }
}

</script>

<style>
.detail {
  padding: 20px;
  background-color: #fff;
  min-height: 100px;
}
</style>
